//
//  UIView + IBExtension.swift
//  ZWWeibo
//
//  Created by flyiron on 16/4/16.
//  Copyright © 2016年 flyiron. All rights reserved.
//

import UIKit

extension UIView {
    @IBInspectable var borderWidth:CGFloat {
        get{
            return self.layer.borderWidth
        }
        set{
            self.layer.borderWidth = newValue
        }
    }
    
    @IBInspectable var borderColor:UIColor {
        get{
            return UIColor(CGColor: self.layer.borderColor!)
        }
        set{
            self.layer.borderColor = newValue.CGColor
        }
    }
    
    @IBInspectable var cornerRadiu: CGFloat {
        get{
            return self.layer.cornerRadius
        }
        set{
            self.layer.cornerRadius = newValue
            self.layer.masksToBounds = newValue > 0
        }
    }
}
